<template>
  <!-- 账户管理通知查询明细页面弹出框-->
  <el-dialog
    title="账户管理通知查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" label-width="160px" :disabled="true">
      <el-form-item style="display: none" label="通知类型：" prop="ntfctnType">
        <el-input v-model="formData.ntfctnType" />
      </el-form-item>
      <el-row>
        <el-col :span="12">
          <el-form-item label="交易流水号：" prop="id">
            <el-input v-model="formData.id" placeholder="交易流水号" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文标识号：" prop="pkgId">
            <el-input v-model="formData.pkgId" placeholder="报文标识号" />
          </el-form-item>
        </el-col>
      </el-row>

      <div v-if="this.formData.ntfctnType != 'TC06'">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                v-model="formData.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="来往标识：" prop="drct">
              <el-select v-model="formData.drct" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.DRCTCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="系统编号：" prop="sysCode">
              <el-select v-model="formData.sysCode" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SYSTEMCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="发起参与机构号：" prop="directSender">
              <el-input v-model="formData.directSender" placeholder="发起参与机构号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="发起参与机构名称：" prop="directSenderName">
              <el-input v-model="formData.directSenderName" placeholder="发起参与机构名称" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="接收参与机构号：" prop="directRecver">
              <el-input v-model="formData.directRecver" placeholder="接收参与机构号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="接收参与机构名称：" prop="directRecverName">
              <el-input v-model="formData.directRecverName" placeholder="接收参与机构名称" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC00'">
        <el-row>
          <el-col :span="12">
            <el-form-item label="行号：" prop="tc00Brno">
              <el-input v-model="formData.tc00Brno" placeholder="行号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="参与机构大类：" prop="tc00OrgClass">
              <el-select v-model="formData.tc00OrgClass" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PARTYCATEGORYCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="生效日期：" prop="tc00EffDate">
              <el-date-picker
                v-model="formData.tc00EffDate"
                type="datetime"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="账户状态：" prop="tc00ActStatus">
              <el-select v-model="formData.tc00ActStatus" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.ACCOUNTSTATUSCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="余额最低控制金额：" prop="tc00RstrctAmtLwrLmt">
              <el-input v-model="formData.tc00RstrctAmtLwrLmt" placeholder="余额最低控制金额" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="余额：" prop="tc00Balance">
              <el-input v-model="formData.tc00Balance" placeholder="余额" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC01'">
        <el-row>
          <el-col :span="12">
            <el-form-item label="清算行行号：" prop="tc01StBrno">
              <el-input v-model="formData.tc01StBrno" placeholder="清算行行号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="清算账户名称：" prop="tc01StActName">
              <el-input v-model="formData.tc01StActName" placeholder="清算账户名称" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="透支限额货币币种：" prop="overCurcd">
              <el-input v-model="formData.overCurcd" placeholder="透支限额货币币种" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="透支限额：" prop="tc01OverdrftLmt">
              <el-input v-model="formData.tc01OverdrftLmt" placeholder="透支限额" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="余额最低控制金额：" prop="tc01RstrctAmtLwrLmt">
              <el-input v-model="formData.tc01RstrctAmtLwrLmt" placeholder="余额最低控制金额" />
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="账户借记控制设置类型：" prop="tc01DbtRstrctSetng">
              <el-select v-model="formData.tc01DbtRstrctSetng" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.D_CTLSET_TYPE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="账户贷记控制设置类型：" prop="tc01CdtRstrctSetng">
              <el-select v-model="formData.tc01CdtRstrctSetng" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.C_CTLSET_TYPE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC02'">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="生效日期：" prop="tc02EffDate">
              <el-date-picker
                v-model="formData.tc02EffDate"
                type="datetime"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="资金池功能开启关闭类型：" prop="tc02SwitchType">
              <el-select v-model="formData.tc02SwitchType" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SWITCHTYPECODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC03'">
        <el-row>
          <el-col :span="12">
            <el-form-item label="监视行行号：" prop="tc03WatchBrno">
              <el-input v-model="formData.tc03WatchBrno" placeholder="监视行行号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="监视行名称：" prop="stBrName">
              <el-input v-model="formData.stBrName" placeholder="监视行名称" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="预警开启关闭类型：" prop="tc03SwitchType">
              <el-select v-model="formData.tc03SwitchType" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SWITCHTYPECODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="货币币种：" prop="warnCurcd">
              <el-select v-model="formData.warnCurcd" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.CURCD"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="余额警戒值：" prop="tc03WarnValue">
              <el-input v-model="formData.tc03WarnValue" placeholder="余额警戒值" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="余额警戒值正负标志：" prop="tc03WarnPmFlag">
              <el-select v-model="formData.tc03WarnPmFlag" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PLUSMINUSTYPECODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC04'">
        <el-row>
          <el-col :span="24">
            <el-form-item label="清算行行号：" prop="tc04StBrno">
              <el-input v-model="formData.tc04StBrno" placeholder="清算行行号" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="质押融资控制标识：" prop="tc04PldgFincgId">
              <el-select v-model="formData.tc04PldgFincgId" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PLDG_FLAG"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="自动质押融资起点金额货币币种：" prop="startingPtCurcd">
              <el-input v-model="formData.startingPtCurcd" placeholder="自动质押融资起点金额货币币种" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="自动质押融资起点金额：" prop="tc04StartingPt">
              <el-input v-model="formData.tc04StartingPt" placeholder="自动质押融资起点金额" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div v-if="this.formData.ntfctnType == 'TC05'">
        <el-row>
          <el-col :span="12">
            <el-form-item label="拆出清算行行号：" prop="tc05DStBrno">
              <el-input v-model="formData.tc05DStBrno" placeholder="拆出清算行行号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="拆入清算行行号：" prop="tc05CStBrno">
              <el-input v-model="formData.tc05CStBrno" placeholder="拆入清算行行号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="拆借协议号：" prop="tc05ProtoNum">
              <el-input v-model="formData.tc05ProtoNum" placeholder="拆借协议号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="有效标识：" prop="tc05EffFlag">
              <el-select v-model="formData.tc05EffFlag" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.EFF_FLAG"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="this.formData.ntfctnType == 'TC06'">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                v-model="formData.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="来往标识：" prop="drct">
              <el-select v-model="formData.drct" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.DRCTCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="系统编号：" prop="sysCode">
              <el-select v-model="formData.sysCode" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.SYSTEMCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="参与机构大类：" prop="absOrgClass">
              <el-select v-model="formData.absOrgClass" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PARTYCATEGORYCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="大额支付往来账号：" prop="hvpspayacc">
              <el-input v-model="formData.hvpspayacc" placeholder="大额支付往来账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="大额支付往来余额：" prop="hvpspayamount">
              <el-input v-model="formData.hvpspayamount" placeholder="大额支付往来余额" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="小额支付往来账号：" prop="bepspayacc">
              <el-input v-model="formData.bepspayacc" placeholder="小额支付往来账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="小额支付往来余额：" prop="bepspayamount">
              <el-input v-model="formData.bepspayamount" placeholder="小额支付往来余额" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="支付清算往来账号：" prop="settleMentacc">
              <el-input v-model="formData.settleMentacc" placeholder="支付清算往来账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="支付清算往来余额：" prop="settlementAmount">
              <el-input v-model="formData.settlementAmount" placeholder="支付清算往来余额" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div v-if="this.formData.ntfctnType != 'TC06'">
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注：" prop="remarks">
              <el-input type="textarea" v-model="formData.remarks" placeholder="备注" maxlength="210" show-word-limit />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通讯状态：" prop="status">
              <el-select v-model="formData.status" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报文接收时间：" prop="rcvTime">
              <el-date-picker
                v-model="formData.rcvTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-form>
    <div slot="footer" class="dialog-footer"></div>
  </el-dialog>
</template>
<script>
export default {
  name: "ManageDetails",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  methods: {
    // 表单重置
    reset() {
      this.resetForm("detailsForm");
      // this.$set(this, "form", {});
    },
    closeFn() {
      this.open = false;
    },
    show() {
      this.open = true;
    },

    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
